
package com.shop.cereshop.commons.domain.wallet;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonIgnore;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 用户钱包表
 * </p>
 *
 * @since 2025-08-26
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@TableName("cere_buyer_wallet")
@ApiModel(value = "BuyerWallet", description = "用户钱包表")
@AllArgsConstructor
public class BuyerWallet {

    private static final long serialVersionUID = 1L;

    /**
     * 钱包ID
     */
    @ApiModelProperty(value = "钱包ID")
    @NotNull(message = "钱包ID不能为空")
    @TableId(value = "wallet_id", type = IdType.AUTO)
    private Long walletId;


    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    @NotNull(message = "用户ID不能为空")
    @TableField("buyer_user_id")
    private Long buyerUserId;


    /**
     * 可用余额
     */
    @ApiModelProperty(value = "可用余额")
    @NotNull(message = "可用余额不能为空")
    @TableField("balance")
    private BigDecimal balance;


    /**
     * 冻结余额
     */
    @ApiModelProperty(value = "冻结余额")
    @NotNull(message = "冻结余额不能为空")
    @TableField("frozen_balance")
    private BigDecimal frozenBalance;


    /**
     * 支付密码(加密)
     */
    @JsonIgnore
    @ApiModelProperty(value = "支付密码(加密)", hidden = true)
    @Length(max = 255, message = "支付密码(加密)长度不能超过255")
    @TableField(value = "pay_password", condition = LIKE)
    private String payPassword;


    /**
     * 是否设置支付密码 0-否 1-是
     */
    @ApiModelProperty(value = "是否设置支付密码 0-否 1-是")
    @NotNull(message = "是否设置支付密码 0-否 1-是不能为空")
    @TableField("is_set_pay_password")
    private Boolean isSetPayPassword;


    /**
     * 支付密码错误次数
     */
    @ApiModelProperty(value = "支付密码错误次数")
    @NotNull(message = "支付密码错误次数不能为空")
    @TableField("pay_password_error_count")
    private Integer payPasswordErrorCount;


    /**
     * 支付密码锁定时间
     */
    @ApiModelProperty(value = "支付密码锁定时间")
    @Length(max = 20, message = "支付密码锁定时间长度不能超过20")
    @TableField(value = "pay_password_lock_time", condition = LIKE)
    private String payPasswordLockTime;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @NotEmpty(message = "创建时间不能为空")
    @Length(max = 20, message = "创建时间长度不能超过20")
    @TableField(value = "create_time", condition = LIKE)
    private String createTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @NotEmpty(message = "更新时间不能为空")
    @Length(max = 20, message = "更新时间长度不能超过20")
    @TableField(value = "update_time", condition = LIKE)
    private String updateTime;




}
